#ifndef YUANSHENPLAY_MIDIEVENT_H
#define YUANSHENPLAY_MIDIEVENT_H

#include <vector>
#include <ostream>

class MidiEvent {
public:
    uint32_t DeltaTime;
    uint8_t Channel = 0xff;
    uint8_t Code;
    std::vector<uint8_t> data;

    MidiEvent(uint32_t DeltaTime, uint8_t MidiCode, uint8_t para_1, uint8_t para_2 = 0xff, uint8_t para_3 = 0xff);

    MidiEvent(uint32_t DeltaTime, uint8_t FormatCode, const std::vector<uint8_t> &data);

    MidiEvent(uint32_t DeltaTime, uint8_t FormatCode, uint8_t type, const std::vector<uint8_t> &data);

    MidiEvent(const MidiEvent &) = default;
    MidiEvent(MidiEvent &&) = default;

    friend std::ostream &operator<<(std::ostream &os, const MidiEvent &event);
};


#endif //YUANSHENPLAY_MIDIEVENT_H
